﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Spotless.Data;

namespace SpotlessWeb.Models
{
    public class ComplaintsAlertViewModel
    {
        public Dictionary<Category, Dictionary<DrillDown, List<DrillDown>>> Categories { get; set; }
        
        public List<ComplaintsAlert> ComplaintAlerts { get; set; }

        public bool Contains(DrillDown variation)
        {
            if (_ComplaintAlertDrillDownIDs == null)
                _ComplaintAlertDrillDownIDs = ComplaintAlerts.Select(x => x.DrillDownId).ToArray();
            return _ComplaintAlertDrillDownIDs.Contains(variation.DrillDownId);
        }

        private int[] _ComplaintAlertDrillDownIDs;
    }
}
